/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package exceptions;

import java.util.LinkedList;

/**
 *
 * @author Carlos
 */
public class ErroLexicoException extends Exception{

        protected LinkedList<ErroLexico> erros = new LinkedList<ErroLexico>();

	public ErroLexicoException(String lexema, String erro, int linha){
		erros.add(new ErroLexico(lexema, erro, linha));
	}

	public ErroLexico getErroLexico() {
		return erros.removeLast();
	}

        public int errosSize(){
            return erros.size();
        }



}
